//
//  AddOtherFeeCell.m
//  NtoccShipper
//
//  Created by mac on 2019/12/23.
//  Copyright © 2019 zhuchongjin. All rights reserved.
//

#import "AddOtherFeeCell.h"
@interface AddOtherFeeCell()
@property (nonatomic,strong) CJLabel *labPayType;
@property (nonatomic,strong) CJLabel *labPayMoney;
@property (nonatomic,strong) CJLabel *labFeeType;
@property (nonatomic,strong) CJLabel *labRemark;
@end
@implementation AddOtherFeeCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (void)setCellInfoWithDic:(NSDictionary *)dic{
    
//    self.labPayMoney.text = CJStringWithFormat(@"%@",@([[CJControl getThreeUnaryValueStr:dic[@"extraFeeAmount"]] floatValue]).cj_money_description);
    self.labFeeType.text = CJStringWithFormat(@"%@",dic[@"extraFeeName"]);
    
    if ([CJStringWithFormat(@"%@",dic[@"extraPayType"]) isEqualToString:@"0"]) {
        // 收入
        self.labPayMoney.textColor = [UIColor cjMainColorText];
        self.labPayMoney.text = @([[CJControl getThreeUnaryValueStr:dic[@"extraFeeAmount"]] floatValue]).cj_money_description;
         self.labPayType.text = @"收入";
    }else if ([CJStringWithFormat(@"%@",dic[@"extraPayType"]) isEqualToString:@"1"]){
        self.labPayMoney.textColor = [UIColor cjRedColor];
        self.labPayMoney.text = CJStringWithFormat(@"-%@",@([[CJControl getThreeUnaryValueStr:dic[@"extraFeeAmount"]] floatValue]).cj_money_description);
        self.labPayType.text = @"支出";
    }
    self.labRemark.text = dic[@"extraFeeRemark"];
}

- (void)btnEdtiorAction{
    if (self.blockEdtior) {
        self.blockEdtior(@"");
    }
}
- (void)btnDeleteAction{
    if (self.blockDelete) {
        self.blockDelete(@"");
    }
}

@end
